const mongoose = require('mongoose')
const { Schema, model } = mongoose

// 文档schema
const topicSchema = new Schema({
    __v: {
        type: Number,
        select: false
    },
    name: { type: String, required: true },
    avatar_url: { type: String },
    introduction: { type: String, select: false },
})


// 话题模型
// Topic 集合名称
// 导出的这个模型也是一个类
module.exports = model('Topic', topicSchema)